<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    *{
      padding: 0;
      margin: 0;
    }
    a{
      color: inherit;
      text-decoration: none;
    }
    .menu{
      margin-left: 50px;
    }
    ul{
      list-style: none;
    }
    .menu >li {
      position: relative;
      display: inline-block;
      background-color: #ccc;
    }
    .menu >li >a {
      display: inline-block;
      padding: 5px 10px;
    }
    .dropdown{
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      height: 100px;
      width: 200px;
      box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.3);
    }
    .menu >li:hover >  .dropdown{
      display: block;
      padding: 10px;
    }
  </style>
</head>
<body>
  <ul class="menu">
    <li>
        <a href="#">菜单一</a>
        <ul class="dropdown">
          <li>
            <a href="#">子菜单</a>
          </li>
        </ul>
    </li>
    <li>
      <a href="#">菜单二</a>
      <ul class="dropdown">
        <li>
          <a href="#">子菜单</a>
        </li>
      </ul>
    </li>
  </ul>
</body>
</html>